package pattern.observer.pull;

/**
 * Created by boot on 8/30/15.
 */
public class Client {
    public static void main(String[] args) {
        WeatherSubject ws = new WeatherSubject();

        WeatherObserver girlObserver = new WeatherObserver();
        girlObserver.setObserverName("女朋友");
        girlObserver.setRemindThing("是我们的第一次约会");
        WeatherObserver momObserver = new WeatherObserver();
        momObserver.setObserverName("老妈");
        momObserver.setRemindThing("是一个购物的好日子");

        ws.attach(girlObserver);
        ws.attach(momObserver);

        ws.setWeatherContent("明天是蓝天白云，29度，适合出游");

    }
}
